import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/OrdinaryMember'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/OrdinaryMember',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/OrdinaryMember.vue'),
                    meta: { title: '普通会员' }
                },
                {
                    path: '/MerchantMember',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/MerchantMember.vue'),
                    meta: { title: '商家会员' }
                },
                {
                    path: '/AddBusiness',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/AddBusiness.vue'),
                    meta: { title: '添加商家会员' }
                },
                {
                    path: '/EditBusiness',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/EditBusiness.vue'),
                    meta: { title: '修改商家会员' }
                },
                {
                    path: '/UnauthenticatedUser',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/UnauthenticatedUser.vue'),
                    meta: { title: '未认证用户' }
                },
                {
                    path: '/MerchantApplication',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/MerchantApplication.vue'),
                    meta: { title: '商家申请' }
                },
                {
                    path: '/BusinessDetails',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/BusinessDetails.vue'),
                    meta: { title: '商家申请详情' }
                },
                {
                    path: '/MerchandiseManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/MerchandiseManagement.vue'),
                    meta: { title: '商品管理' }
                },
                {
                    path: '/productDetails',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productDetails.vue'),
                    meta: { title: '商品详情' }
                },
                {
                    path: '/OrderList',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/OrderList.vue'),
                    meta: { title: '订单列表' }
                },
                {
                    path: '/orderDetails',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/orderDetails.vue'),
                    meta: { title: '订单详情' }
                },
                {
                    path: '/AfterSalesOrderList',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/AfterSalesOrderList.vue'),
                    meta: { title: '售后订单列表' }
                },
                {
                    path: '/AfterSalesOrderDetails',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/AfterSalesOrderDetails.vue'),
                    meta: { title: '售后订单详情' }
                },
                {
                    path: '/WithdrawalsRecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/WithdrawalsRecord.vue'),
                    meta: { title: '提现记录' }
                },
                {
                    path: '/CashBackRecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/CashBackRecord.vue'),
                    meta: { title: '返现记录' }
                },
                {
                    path: '/ServiceFeeSetting',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ServiceFeeSetting.vue'),
                    meta: { title: '服务费设置' }
                },
                {
                    path: '/SocialManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/SocialManagement.vue'),
                    meta: { title: '社交管理' }
                },
                {
                    path: '/userList',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/userList.vue'),
                    meta: { title: '用户列表' }
                },
                {
                    path: '/RolePermissions',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/RolePermissions.vue'),
                    meta: { title: '角色权限' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
